﻿// -------------------------------------------------------------------------------------------------------------------------------
// <copyright file="Matrix{T}.cs" company="Exul">
//     Copyright (c) Exul. All rights reserved.
// </copyright>
// <author>
//     Exul
// </author>
// -------------------------------------------------------------------------------------------------------------------------------

namespace ExulLibrary.Mathematics.LinearAlgebra
{
    /// <summary>
    ///     Represents a matrix.
    /// </summary>
    /// <typeparam name="T">
    ///     The type of values of matrix elements.
    /// </typeparam>
    public abstract class Matrix<T>
    {
        #region Properties

        #region public

        /// <summary>
        ///     Gets the registration index of the matrix that uniquely identifies type of matrix.
        /// </summary>
        /// <value>
        ///     The registration index of the matrix that uniquely identifies type of matrix.
        /// </value>
        public abstract int MatrixRegistrationIndex
        {
            get;
        }

        /// <summary>
        ///     Gets the number of columns in the matrix.
        /// </summary>
        /// <value>
        ///     The number of columns in the matrix.
        /// </value>
        public int ColumnsCount
        {
            get;
            protected set;
        }

        /// <summary>
        ///     Gets a value indicating whether the matrix is square.
        /// </summary>
        /// <value>
        ///     <see langword="true"/> if the matrix is square; otherwise, <see langword="false"/>.
        /// </value>
        public bool IsSquare
        {
            get
            {
                return this.RowsCount == this.ColumnsCount;
            }
        }

        /// <summary>
        ///     Gets the number of rows in the matrix.
        /// </summary>
        /// <value>
        ///     The number of rows in the matrix.
        /// </value>
        public int RowsCount
        {
            get;
            protected set;
        }

        #endregion

        #endregion
    }
}